<?php
@session_start();

$con = mysqli_connect("127.0.0.1","root","","posts");

$name = $_SESSION['user'];

$query = "select * from info where name= '$name'";
$result=mysqli_query($con,$query);
$arr = mysqli_fetch_row($result);

echo json_encode($arr);
mysqli_close($con);


?>